import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [{
  path: '/',
  name: 'Main',
  component: () => import('@/views/admin/Main.vue'),
  children: [{
      path: "/column",
      name: 'Column',
      component: () => import("@/views/admin/column/Column.vue"),
    }, {
      path: "/column/add",
      name: 'ColumnAdd',
      component: () => import("@/views/admin/column/AddOne.vue"),
    }, {
      path: "/column/restOneColumn",
      name: 'restOneColumn',
      component: () => import("@/views/admin/column/Restcolumn.vue"),
    }, {
      path: "/leavemsg",
      name: 'Leavemsg',
      component: () => import("@/views/admin/leavemsg/leavemsg.vue")
    }, {
      path: "/leavemsg",
      name: 'Leavemsg',
      component: () => import("@/views/admin/leavemsg/leavemsg.vue")
    },
    {
      //已读未读
      path: "/leavemsg/read",
      name: 'LeavemsgRead',
      component: () => import("@/views/admin/leavemsg/read.vue")
    },
    {
      //表单内容编辑
      path: "/leavemsg/read_editor",
      name: 'LeavemsgReadEditor',
      component: () => import("@/views/admin/leavemsg/read_editor.vue")
    },
    {
      //添加留言
      path: "/leavemsg/leavemsg_add",
      name: 'LeavemsgAdd',
      component: () => import("@/views/admin/leavemsg/leavemsg_add.vue")
    }, {
      path: "/api_manage",
      name: "ApiManage",
      component: () => import("@/views/admin/api_manage/api_manage.vue")
    },
    {
      path: "/self-defined/classify",
      name: "Classify",
      component: () => import("@/views/admin/self-defined/classify.vue")
    },
    {
      path: "/self-defined/content",
      name: "Content",
      component: () => import("@/views/admin/self-defined/content.vue")
    },
    {
      path: "/SEO/SEOhome",
      name: "SEOhome",
      component: () => import("@/views/admin/SEO/SEOhome.vue")
    },
    {
      path: "/SEO/TAG",
      name: "TAG",
      component: () => import("@/views/admin/SEO/TAG.vue")
    },
    {
      path: "/SEO/TAG/add",
      name: "TAGAdd",
      component: () => import("@/views/admin/SEO/TAG/AddOne.vue")
    },
    {
      path: "/SEO/links",
      name: "Links",
      component: () => import("@/views/admin/SEO/Links.vue")
    },
    {
      path: "/SEO/anchortext",
      name: "Anchortext",
      component: () => import("@/views/admin/SEO/Anchortext.vue")
    },
    {
      path: "/SEO/map",
      name: "Map",
      component: () => import("@/views/admin/SEO/Map.vue")
    },
    {
      path: "/SEO/url",
      name: "Url",
      component: () => import("@/views/admin/SEO/Url.vue")
    },
  ]
}]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router